package model.enemy;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Point;
import java.io.IOException;

import javax.imageio.ImageIO;

import model.game.EnemyWave;
import model.game.Path;
import model.player.Player;



public class YellowEnemy extends AbstractEnemy {
	
	private Image _img = null;
	
	
	public YellowEnemy(Path path, Player player, Point startPos, EnemyWave enemyWave) {
		
		super(path, player, startPos, enemyWave);
		
		try {
			_img = ImageIO.read(getClass().getResource("/yellow.png"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	
	/**
	 * Draw the enemy on the buffer g 
	 * 
	 * @param g
	 */
	protected void _drawEnemy(Graphics g) {
		
		if (null != _img)
			g.drawImage(_img, (int)_posX - (int)(AbstractEnemy.ENEMY_SIZE / 2), (int)_posY - (int)(AbstractEnemy.ENEMY_SIZE / 2), AbstractEnemy.ENEMY_SIZE, AbstractEnemy.ENEMY_SIZE, this);

	}
	
}
